interface stateType {
  sidebar: {
    opened: Boolean;
  };
}
const state: stateType = {
  sidebar: {
    opened: false,
  },
};

const mutations = {
  TOGGLE_OPENED: (state: stateType): void => {
    console.log('bibi');
    state.sidebar.opened = !state.sidebar.opened;
  },
};

const actions = {
  // @ts-ignore
  toggleOpened({ commit }) {
    commit('TOGGLE_OPENED');
  },
};

export default {
  namespace: true,
  state,
  mutations,
  actions,
};
